import request from '@/utils/request'

export function rewriteThesaurus(data) {
    return request({
        url: '/api/ai/rewriteThesaurus',
        method: 'POST',
        data
    })
}
export function rewriteDepth(data) {
    return request({
        url: '/api/cache_article/add',
        method: 'POST',
        data
    })
}
export function originalTitle(data) {
    return request({
        url: '/api/ai/originalTitle',
        method: 'POST',
        data
    })
}
export function rewriteTitle(data) {
    return request({
        url: '/api/ai/rewriteTitle',
        method: 'POST',
        data
    })
}
export function rewriteContentTitle(data) {
    return request({
        url: '/api/ai/rewriteContentTitle',
        method: 'POST',
        data
    })
}
export function delArticle(data) {
    return request({
        url: '/api/cache_article/deleted',
        method: 'POST',
        data
    })
}

export function edit_article(data, id) {
    return request({
        url: '/api/cache_article/editArticle',
        method: 'post',
        data,
        params: {
            cacheArticleId: id
        }
    })
}
export function release(data) {
    return request({
        url: '/api/cache_article/release',
        method: 'POST',
        data
    })
}
export function getHtml(data) {
    return request({
        url: '/api/index/getHtml',
        method: 'POST',
        data
    })
}
export function cache_article(params) {
    return request({
        url: '/api/cache_article/list',
        method: 'get',
        params
    })
}
export function cache_detail(params) {
    return request({
        url: '/api/cache_article/detail',
        method: 'get',
        params
    })
}
export function image_search(data) {
    return request({
        url: '/api/image/search',
        method: 'post',
        data
    })
}
export function upload_image(data) {
    return request({
        url: '/api/upload/image',
        method: 'post',
        data
    })
}

export function search_image(data) {
    return request({
        url: '/api/image/search',
        method: 'post',
        data
    })
}
